<!DOCTYPE html>
<?php
    session_start();
	include "conexion_bd.php";
    $mysqli->set_charset("utf8");
	
	$query=$mysqli->query('SELECT * FROM persona WHERE ci="'.$_SESSION['ci'].'"');
	$rs= $query->fetch_assoc();
	
	if($rs['sexo']=='M'){$sexo='Masculino';
	}elseif ($rs['sexo']=='F') { $sexo='Femenino';
	} else $sexo='Sin especificar';
	
	if(!$rs['email_alternativo']) $email='Sin especificar';

	if($rs['tipo']!='Profesor'||$rs['tipo']!='Personal Administrativo'||$rs['tipo']!='Preparador'
	||$rs['tipo']!='Auxiliar docente'||$rs['tipo']!='Estudiante' ) $rs['tipo']='Administrador';
?>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Panel Administrador</title>

    <link href="css/bootstrap.min.css" rel="stylesheet">
    <link href="css/jquery.dataTables.min.css" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="css/plugins/timeline/timeline.css" rel="stylesheet">
    <link href="css/sb-admin.css" rel="stylesheet">
</head>
<body>
    <div id="wrapper">
        <nav class="navbar navbar-static-top navbar-inverse" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="main.php">Panel Administrador</a>
            </div>
            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-envelope fa-fw"></i>  <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-messages">
                        <li>
                            <a href="#">
                                <div>
                                    <strong></strong>
                                    <span class="pull-right text-muted">
                                        <em></em>
                                    </span>
                                </div>
                                <div>...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <strong></strong>
                                    <span class="pull-right text-muted">
                                        <em></em>
                                    </span>
                                </div>
                                <div>...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <strong>J</strong>
                                    <span class="pull-right text-muted">
                                        <em>Y</em>
                                    </span>
                                </div>
                                <div>...</div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>Read All Messages</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-bell fa-fw"></i>  <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-alerts">
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> New Comment
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                    <span class="pull-right text-muted small">12 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-envelope fa-fw"></i> Message Sent
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-tasks fa-fw"></i> New Task
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>See All Alerts</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-user fa-fw"></i>  <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li class="active"><a href="#"><i class="fa fa-user fa-fw"></i> Perfil</a>
                        </li>
                        <li><a href="#"><i class="fa fa-gear fa-fw"></i> Configuraci&oacute;n</a>
                        </li>
                        <li class="divider"></li>
                        <li><a href="logout.php"><i class="fa fa-sign-out fa-fw"></i> Salir</a>
                        </li>
                    </ul>
                </li>
            </ul>
        </nav>
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav nav-pills nav-stacked" id="side-menu">
                    <li>
                        <a href="main.php"></i>SIGEC</a>
					</li>
                    <li id="menu_perfil"  class="active">
                        <a href="#"></i>Perfil de usuario</a>
                        <!--<ul class="nav nav-second-level">
                            <li class="active">
                                <a id="datos" href="#">Datos personales</a>
                            </li>
							<li class="active">
                                <a id="datos_admin" href="#">Datos administrativos</a>
                            </li>
                            <li>
                                <a id="pass" href="#">Contrase&ntilde;a</a>
                            </li>
                        </ul>-->
                    </li>                    
                </ul>
            </div>
        </nav>
        <div id="page-wrapper">
            <div class="row">
                <div class="col-xs-12"><br/></div>
            </div>
            <div id="mensajito_exito" class="alert alert-success alert-dismissable" style="display: none;">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                ¡Se han actualizado correctamente los datos!
            </div>
            <div id="mensajito_error" class="alert alert-danger alert-dismissable" style="display: none;">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                ¡Ha ocurrido un error! No se pudo actualizar los datos
            </div>
			
            <div id = "caja" class="row" style="clear:both;">
			<div class="col-lg-12">
				<div class="panel panel-default">
					<div class="panel-body" style = "background: #CEE3F6">            
						
						<div class="col-lg-8">
							<br/>
							<h1 style="text-align:center;">Perfil de <b id="resaltador"><?php echo $_SESSION['nombre'],' ',$rs['primer_apellido'];?></b></h1>
							<br/>
							<div class="col-xs-2"></div>
							<div class="col-xs-8" >
							<p><b>Nombre(s):</b>&nbsp; <?php echo $rs['primer_nombre'],' ',$rs['segundo_nombre'];?></p>
							<p><b>Apellido(s):</b> &nbsp;<?php echo $rs['primer_apellido'],' ',$rs['segundo_apellido'];?></p>
							<p><b>Sexo:</b>&nbsp; <?php echo $sexo;?></p>
							<p><b>Ocupaci&oacute;n:</b> &nbsp;<?php echo $rs['tipo'];?></p>
							<p><b>Direcci&oacute;n:</b> &nbsp;<?php echo $rs['direccion'];?></p>
							<p><b>Tel&eacute;fono(s):</b> &nbsp;<?php echo $rs['telefono_1'],' / ',$rs['telefono_2'];?></p>
							<p><b>Correo electr&oacute;nico institucional:</b>&nbsp; <?php echo $rs['email_institucional']?></p>
							<p><b>Correo electr&oacute;nico alternativo:</b> &nbsp;<?php echo $email?></p>
							<br/>
							</div>
						</div>
					</div>
				</div>
            </div>
            </div>
        </div>
		
        <div class = "col-xs-12"></br></br></div>
    
        <nav class="navbar navbar-fixed-bottom navbar-default" role="navigation">
				<div class="navbar-header pull-left">
					<a href="http://www.ucv.ve" title="Universidad Central de Venezuela"><img src="img/ucv.png" style="margin-left: 15px" width="60" height="60" border="0"></a>
					<a href="http://www.ciens.ucv.ve/ciens/" title="Facultad de Ciencias"><img src="img/Facultadciencias.png" style="margin-left: 5px" width="60" height="60"></a>
					<a href="http://www.ciens.ucv.ve/escueladecomputacion/inicio/index" title="Escuela de Computaci&oacute;n"><img src="img/logo_computacion.png" style="margin-left: 5px" width="60" height="60"></a>
				</div>
                <div class="navbar-header  pull-right ">
                    <p class="navbar-text" style="margin-top: 15%" href="#">@ Ibis Development 2014</p>
                </div>
        </nav>
    </div>

    <script src="js/jquery-1.11.0.js"></script>
    <script src="js/bootstrap.min.js"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/jquery.dataTables.min.js"></script>
    <script src="js/jquery.validate.min.js"></script>
    <script src="js/sb-admin.js"></script>

</body>
</html>